/*!
 * 附件管理 通用（请求）方法
 *  
 * 作者：张莉
 * Copyright (c) 2019/12/04
 * 
 */

/**
 * @method findAttchList 附件查询列表接口
 * @param {number} page 附件表格当前显示的页数
 * @param {number} size 附件表格一页有多少条数据
 * @return axios
 */ 
export const findAttchList = (page, size, params) => {
  return axios.post(`/attachment/findAttchList/${page}/${size}`, params)
}
/**
 * @method getDomainAuth 附件管理树顶级接口
 * @param {object} params 存放系统名称domainName和系统编码domainCode
 * @return axios
 */
export const getDomainAuth = (params) => {
  return axios.post('/rbac/ccmsDomainAuth/getDomainAuth', params)
}
/**
 * @method findBigCat 获取附件大类数据接口
 * @param {string} id 附件树系统的domainId
 * @return axios
 */
export const findBigCat = (id) => {
  return axios.get(`/attachment/findBigCat/${id}`)
}
/**
 * @method findSmallCat 获取附件小类类数据接口
 * @param {string} id 附件大类bigCatId
 * @return axios
 */
export const findSmallCat = (id) => {
  return axios.get(`/attachment/findSmallCat/${id}`)
}
/**
 * @method attachmentDelete 附件表格删除接口
 * @param {string} id 附件表格当前行attId
 * @return axios
 */
export const attachmentDelete = (id) => {
  return axios.delete(`/attachment/delete/${id}`)
}
/**
 * @method attachmentPrevie 附件预览接口
 * @param {string} id 附件表格当前行attId
 * @return axios
 */
export const attachmentPrevie = (id) => {
  return axios.get(`/attachment/preview/${id}`)
}
/**
 * @method attachmentDeleteBath 根据附件id批量删除附件
 * @param {object} params 选中附件表格当前行attIds数组
 * @return axios
 */
export const attachmentDeleteBath = (params) => {
  return axios.post('/attachment/deleteBath', params)
}
